package binary;

/**
 * @author Huangjin
 * @version 1.0
 * describe:补码的演示
 * @date 2023/3/6 11:39
 */
public class ComplementDemo {
    public static void main(String[] args) {
        //规律数：
        int max = Integer.MAX_VALUE;
        int min = Integer.MIN_VALUE;
        System.out.println(Integer.toBinaryString(max));
        System.out.println(Integer.toBinaryString(min));
        System.out.println(Integer.toBinaryString(-1));

        int n = 45;
        System.out.println(Integer.toBinaryString(n));
        System.out.println(n);
    }
}
